﻿using System.ComponentModel.DataAnnotations;
using ServiceStack.DataAnnotations;

namespace NetSurveillance.WebApp.DataServices.Models
{
    [Alias("VirusEmbedRules")]
    public class VirusEmbedRule : BaseModel
    {
        [AutoIncrement]
        public long Id { get; set; }

        [Required(AllowEmptyStrings = false)]
        [StringLength(50)]
        public string RuleName { get; set; }

        public bool IsRedirectPage { get; set; }

        [StringLength(200)]
        public string OriginPage { get; set; }

        [StringLength(200)]
        public string TargetPage { get; set; }

        public bool IsRedirectFile { get; set; }

        [StringLength(200)]
        public string OriginFileName { get; set; }

        [StringLength(200)]
        public string TargetFileName { get; set; }

        public bool IsRedirectAfterInstall { get; set; }

        [StringLength(200)]
        public string RedirectUrlAfterInstall { get; set; }

        [References(typeof(User))]
        public long CreateUserId { get; set; }

        [Ignore]
        public User CreatedUser { get; set; }
    }
}
